#!/usr/bin/perl

dbmopen %FILE, "/home/user/file", 0666;  # opens/creates the file with read and write permissions for user, group and all

$FILE{"name1"} = "value1";        # write a name value pair to the file
$FILE{"name1"} = "anotherValue1;  # Overwrite the previous value
$theValue = $FILE{"name1"};       # Retrieve the value for name1
delete $FILE{"name1"};            # delete a name value pair
